<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="vue.js"></script>
    <title>绑定动态样式</title>
</head>
<body>
    <style>
        p.font-small {
            font-size: 18px;
        }
        p.font-medium {
            font-size: 24px;
        }
        p.font-big {
            font-size: 32px;
        }
    </style>
    <div id="id-a-c-p">
        <p>这是vue班级文档。</p>
        <p :class="{'font-big' :pBigActive}">{{msg}}</p>
        <p :class="{'font-medium' :pMediumActive}">{{msg}}</p>
        <p :class="{'font-small' :pSmallActive}">{{msg}}</p>
        <script>
            var vm = new Vue({
                el: '#id-a-c-p',
                data: {
                    msg: "你好大Sabine！",
                    pBigActive:true,
                    pMediumActive:false,
                    pSmallActive:true
                }
            })
        </script>
    </div>
</body>
</html>